<?php

/*
 * Object/Poste.php
 */

namespace RHX\Model\Object;

class Poste {

    public $id;
    public $code;
    public $libelle;
    public $niveau;
    public $echelon;
    public $college;
    public $rang;

    public function __construct($data = array()) {
	$this->exchangeArray($data);
    }

    public function exchangeArray($data) {
	$this->id		 = isset($data['id']) ? $data['id'] : null;
	$this->code	 = isset($data['code']) ? $data['code'] : '';
	$this->libelle	 = isset($data['libelle']) ? $data['libelle'] : '';
	$this->niveau	 = isset($data['niveau']) ? $data['niveau'] : 1;
	$this->echelon	 = isset($data['echelon']) ? $data['echelon'] : 1;
	$this->college	 = isset($data['college']) ? $data['college'] : 'Employé';
        $this->rang	 = isset($data['rang']) ? $data['rang'] : 1;
    }

    public function getArrayCopy() {
	return get_object_vars($this);
    }

}

?>
